/*kZime*/
#include <iostream>
#include <cstdio>
#include <cstring>
#include <queue>
#include <vector>
#define MAXN 233
using namespace std;

vector<int>ed[MAXN];
int n, m, low[MAXN], dfn[MAXN],fa[MAXN] , tt;
vector<int> f;
bool is_cut[MAXN];

inline int read() {
	int k = 0;
	char c = getchar();
	for(; !isdigit(c); c = getchar());
	for(; isdigit(c); c = getchar())k = k * 10 + c -'0';
	return k;
}

void tarjan(int a, int father) {
	fa[a] = father;
	low[a] = dfn[a] = ++tt;
	for(int i = 0; i < ed[a].size(); i++) {
		int b = ed[a][i];
		if(!dfn[b]) {
			tarjan(b, a);
			low[a] = min(low[a], low[b]);
		}
		else if(b != fa[a]) {
			low[a] = min (low[a], dfn[b]);
		}
	}
}

int main() {
	freopen("gd.in", "r", stdin);
	freopen("gd.out", "w", stdout);
	n = read();
	int x, y;
	while(scanf("%d%d",&x,&y) == 2) {
		m++;
		ed[x].push_back(y);
		ed[y].push_back(x);
	}
	
	tarjan(1 ,0);
	
	
	for(int i = 1; i <= n; i++) {
		if(low[i] >= dfn[fa[i]]) is_cut[fa[i]] = 1; 
	}
	
	is_cut[1] = 0;
	
	tarjan(2, 0);
	
	for(int i = 1; i <= n; i++) {
		if(fa[i] == 1 && low[i] >= dfn[fa[i]]) {
			is_cut[fa[i]] = 1;
			break;
		}
	}
	
	for(int i = 1; i <= n; i++) {
		if(is_cut[i])f.push_back(i);
	}
	
	printf("%d\n",f.size());
	
	for(int i = 0; i < f.size(); i++) {
		printf("%d\n",f[i]);
	}
	
	return 0;
	
}




